﻿using ProxyWrapper.CommonProxyService;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ProxyWrapper
{
  public  class QuestionsServiceWrapper
    {
        CommonServiceSoapClient client = null;
        public string AddUpdateQuestion(CommonProxyService.Questions _objQuestion)
        {
            client = new CommonServiceSoapClient();
            return client.CreateQuestion(_objQuestion);
        }

        public List<CommonProxyService.Questions> GetQuestionsList(int clientId, string hashCOde)
        {
            client = new CommonServiceSoapClient();
            Questions[] _questions= client.GetQuestionsList(clientId, hashCOde);
            return _questions!=null ?_questions.ToList<CommonProxyService.Questions>():null;
        }
        public string AssociateQuestions(ServicesProxy.Questions question, int serviceId)
        {
            return new ServicesProxy.ServicesSoapClient().AssociateQuestions2Service(question, serviceId);
        }
    }
}
